import Vue from 'vue'
import Router from 'vue-router'

import Home from '@/components/container/Home/home'
import Order from '@/components/container/Order/Order'
import My from '@/components/container/My/My'
import ShopCart from '@/components/container/ShopCart/ShopCart'
import NotFound from '@/components/container/NotFound/NotFound'
import Hot from "../components/container/Home/SubPage/Hot";
import Recommmend from "../components/container/Home/SubPage/Recommmend";

Vue.use(Router)

export default new Router({
  linkActiveClass:'active',
  routes: [
    {
      path:'/',
      redirect:'/home'

    },
    {
      path:'/Home',
      name:'Home',
      component: Home,
      children:[
        {
          path:'/hot',
          component:Hot,
          name:'Hot'
        },
        {
          path: '/recommmend',
          component: Recommmend,
          name: 'Recommmend'
        }
      ]

    },
    {
      path: '/order',
      name: 'Order',
      component:Order
    },
    {
      path: '/my',
      name: 'My',
      component:My
    },
    {
      path: '/shopCart',
      name: 'ShopCart',
      component:ShopCart
    },
    {
      path: '/notFound',
      name: 'NotFound',
      component:NotFound
    }
  ]
})
